<template>
    <div>
        取父组件的name: {{ sss }} <br />
        其余的继续往后传递
        <Son
            v-bind="$attrs"
            v-on="$listeners"
        />
    </div>
</template>

<script>
import { reactive, toRefs } from '@vue/composition-api';
import Son from './son';

export default {
    components: {
        Son,
    },
    props: {
        name: String,
    },
    setup (props, context) {
        // console.log(props, context);
        const state = reactive({
            sss: props.name,
        });
        return {
            ...toRefs(state),
        };
    },
};
</script>

<style>

</style>
